#!/usr/bin/env python
# _*_coding:utf-8_*_

"""
@Time : 2022/5/29 12:06
@Author: RunAtWorld
@File: exception_demo.py
"""
import logging as log


def get_exceptino():
    try:
        print_exception_msg()
    except Exception as e1:
        log.error(f"finally err is :%s", e1)
        print(f'e1:{e1}')
        print('cause:', e1.__cause__)


def print_exception_msg():
    try:
        a = 1 / 0
        print(a)
    except Exception as e:
        print(f'Exception:{e}', e)
        raise ValueError(f'print_exception_msg error:{e}') from e


if __name__ == '__main__':
    get_exceptino()
